#ifndef BOOKUNRARQUEUETHREAD_H
#define BOOKUNRARQUEUETHREAD_H

#include <QThread>
#include <QObject>
#include <QPair>
class Book;

class BookUnrarQueueThread : public QThread
{
    Q_OBJECT

public:
    enum QueueType {
        PageName,
        PageImage
    };

    BookUnrarQueueThread(QueueType type);

protected:
    void run();

signals:
    void queueNext(Book* book);

public:
    void append(Book* book);
    void next();
    bool haveItems();

private:
    QList<Book*>                        m_imageQueue;
    QList<Book*>                        m_nameQueue;
    bool                                m_canProceed;
    QueueType                           m_type;
};

#endif // BOOKUNRARQUEUETHREAD_H
